//
//  AddCarViewController.m
//  PeopleStreet
//
//  Created by 刘建峰 on 16/7/8.
//  Copyright © 2016年 yuf. All rights reserved.
//

#import "AddCarViewController.h"
#import "CodeView.h"

@interface AddCarViewController ()
@property (weak, nonatomic) IBOutlet UIView *navView;
@property (weak, nonatomic) IBOutlet UIButton *addButton;
@property (weak, nonatomic) IBOutlet UIScrollView *scroView;
@property (weak, nonatomic) IBOutlet UIButton *setButton;
@property (strong, nonatomic) CodeView *licensePlateLabel;//车牌输入框

@end

@implementation AddCarViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initViewLayout];
    // Do any additional setup after loading the view.
}


- (void)initViewLayout{

    [self adaptiveViewLayout:self.view];
    [self adaptiveViewLayout:self.navView];
    [self adaptiveViewLayout:self.scroView];
    _addButton.layer.masksToBounds = YES;
    _addButton.layer.cornerRadius = 20*VerticalRatio();
    _scroView.contentSize = flexibleSize(CGSizeMake(0, 505), NO);
    
    self.licensePlateLabel = [[CodeView alloc] initWithFrame:flexibleFrame(CGRectMake(56, 45, 264, 40), NO)
                                                         num:6
                                                   lineColor:[UIColor colorWithWhite:0.251 alpha:1.000]
                                                    textFont:15*VerticalTexeRatio()];
    
    //下划线
    self.licensePlateLabel.hasUnderLine = NO;
    //分割线
    self.licensePlateLabel.hasSpaceLine = YES;
    
    //输入风格
    self.licensePlateLabel.codeType = CodeViewTypeCustom;
    [self.scroView addSubview:self.licensePlateLabel];

}

- (IBAction)back:(id)sender {
    [self.navigationController  popViewControllerAnimated:YES];
}


- (IBAction)setHandel:(UIButton *)sender {
    sender.selected = !sender.selected;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
